﻿var data = {};
var systemInfo = {}; //系统信息
systemInfo.netName = "";
systemInfo.adminName = "";
systemInfo.adminInfo = "";
systemInfo.whereFrom = "";
systemInfo.adminImg = "";
var resources = []; //资源列表

data.systemInfo = systemInfo;
data.resources = resources;
var appVue = new Vue({
	el: "#app",
	data: data
});

$(function() {
	//加载文章列表
	layui.flow.load({
		elem: '#div_resource_buttom',
		isAuto: false,
		done: function(page, next) {
			getShareFilePae(function(result) {
				var resultData = result.data;
				for(var i = 0; i < resultData.length; i++) {
					resources.push(resultData[i]);
				};
				next("", page < result.totalPage);
			}, page, 5);
		}
	});

	//获取网站信息
	getSizeInfo(function(result) {
		var resultData = result.data;
		systemInfo.netName = resultData.siteShortTitle;
		systemInfo.adminName = resultData.adminRealname;
		systemInfo.adminInfo = resultData.adminProfession;
		systemInfo.whereFrom = resultData.adminPosition;
		systemInfo.adminImg = resultData.adminImg;
		document.title = resultData.siteTitle;
	});

});